package com.tcd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tcd.pojo.UserGroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户组 Mapper 接口
 * </p>
 *
 * @author space
 * @since 2021-05-25
 */
public interface UserGroupMapper extends BaseMapper<UserGroup> {
    List<UserGroup> selectUserGroupFilter(@Param("pageIndex") Integer pageIndex,@Param("pageSize")  Integer pageSize,@Param("name") String name,@Param("state") Boolean state, @Param("roleId") Integer roleId);

    Integer selectUserGroupFilterCount(@Param("name") String name,@Param("state") Boolean state, @Param("roleId") Integer roleId);

    Integer deleteUserGroupRole(Integer groupId);

    Integer setUserGroupRole(@Param("groupId") Integer groupId,@Param("roleIds") Integer[] roleIds);

    UserGroup selectUserGroupById(Integer groupId);
}
